Comments (8)
Yeah, sorry.
Since I have no plans on buying Day One 2 I won't be able to bake in support for that, sorry. Maybe someone else could do a bit of research on the new data format and if it's even possible to create new posts from external sources?
from elizabeth.
Hey, thanks for the reply!
I think I can make the fix, but I'm not so familiar with how how Elizabeth is structured - if you could answer a couple of questions I'll have, I'd be happy to add in a Day One 2 exporter.
from elizabeth.
I've forked it and created a DayOne2Export.js, butchered from your DayOneExport.js.
However, I'm a little over my head - I'm getting an error you might be able to shed some light on.
invalid document source
@#[line:0,col:undefined]
/usr/local/lib/node_modules/elizabeth/node_modules/dayone/node_modules/plist/lib/parse.js:45
if (doc.documentElement.nodeName !== 'plist') {
^
TypeError: Cannot read property 'documentElement' of undefined
at Object.parse (/usr/local/lib/node_modules/elizabeth/node_modules/dayone/node_modules/plist/lib/parse.js:45:10)
at DayOneEntry.fromOutputFormat [as fromFile] (/usr/local/lib/node_modules/elizabeth/node_modules/dayone/lib/DayOneEntry.js:58:23)
at /usr/local/lib/node_modules/elizabeth/node_modules/dayone/lib/DayOne.js:49:19
at Array.forEach (native)
at DayOne.list (/usr/local/lib/node_modules/elizabeth/node_modules/dayone/lib/DayOne.js:47:30)
at DefaultPlugin.loadEntries (/usr/local/lib/node_modules/elizabeth/lib/output/DayOne2Export.js:201:17)
at DefaultPlugin.exportDay (/usr/local/lib/node_modules/elizabeth/lib/output/DayOne2Export.js:75:8)
at /usr/local/lib/node_modules/elizabeth/lib/Elizabeth.js:143:17
at Request._callback (/usr/local/lib/node_modules/elizabeth/node_modules/moves-api/lib/MovesApi.js:126:13)
at Request.self.callback (/usr/local/lib/node_modules/elizabeth/node_modules/request/request.js:123:22)
when I tell it to use the new exporter (which I know it's pulling in - I have it dump out 'this' around line 198 inside loadEntries()
which gives me this:
davem$ ellie export --dayStart 20160201 --dayEnd 20160204
Welcome to Elizabeth, your Moves.app exporter!
----------------------------------------------
> Using DayOne2Export to export 3 days!
> Using DayOne2 directory: /Users/davem/Library/Group Containers/5U8NS4GX82.dayoneapp2/Data/Auto Import/Default Journal.dayone/
DefaultPlugin {
help:
{ name: 'DayOne2Export',
description: 'Exports into your Day One 2',
options:
{ directory: 'DayOne 2 data directory. (default: auto, only works with Day One 2 Mobile Import)',
overwrite: 'Overwrite existing imported entries. If set to false they will be skipped. (default: false)',
tag: 'The unique tag that will be added to the generated entries. (default: moves-import)',
timezone: 'Timezone for new entries. (default: Europe/London)' } },
options:
{ directory: '/Users/davem/Library/Group Containers/5U8NS4GX82.dayoneapp2/Data/Auto Import/Default Journal.dayone/',
overwrite: false,
tag: 'moves-import',
timezone: 'Europe/London',
output: 'DayOne2Export',
outputFile: '%date%_plaintext.txt',
days: '7' },
entryCache: null,
dayOne:
DayOne {
options: { directory: '/Users/davem/Library/Group Containers/5U8NS4GX82.dayoneapp2/Data/Auto Import/Default Journal.dayone/' } },
gmap:
DefaultPlugin {
help:
{ name: 'GoogleMapExport',
description: 'Exports as a static google map',
options: [Object] },
options:
{ outputFile: '%date%.png',
dateFormat: 'YYYYMMDD',
size: '800x450',
zoomFactor: 13,
format: 'jpg',
addPlaces: true } } }
Any ideas?
from elizabeth.
Elizabeth uses my DayOne library to read/write entries. I think you need to bake in DO2 support there first:
https://github.com/pwaldhauer/dayone
from elizabeth.
Thanks Philipp,
You're absolutely right, of course. You also know I have 3 months of Moves data I've not imported yet! :)
It was a fairly simple tweak to get your Day One importer to support Day One (1) and Day One 2 - just running some checks and then I'll pop the changes over there.
Thanks again!
from elizabeth.
Hi dave, did you ever complete those checks and get it to work?
from elizabeth.
I was in deeper than I hoped to be, @blueneogeo. In the end, I just symlinked the Day One 2 import folder (I think it's in ~/Library/Day One 2/ somewhere) to the Day One 1 import folder, and it carried on fine.
For a while, anyway - something else has snagged for me and I need to look into it properly. Try the symlink for a quick solution that might work, though.
from elizabeth.
from elizabeth.
Related Issues (20)
- DayOneExport not working HOT 5
- init has issues with writing config and finishing auth HOT 3
- export throws error "Cannot read property 'date' of undefined" HOT 3
- Wouldn't Export to DayOne at all using "auto"
- Invalid document source HOT 1
- Error Export in Day One with utf8 encoding strings HOT 4
- Running elizabeth with launchd HOT 3
- invalid document source @#[line:0,col:undefined] Please help, I got this to work once, but after reinstall, I get the same error... HOT 3
- Error getting token from Moves HOT 2
- edit script to remove google map HOT 1
- Support for Slogger
- Cannot run Elizabeth for setting more than 7 days HOT 4
- Code in DayOneExport could be refactored into library
- has anyone made any progress getting this to work? HOT 1
- "path.homedir is not a function" HOT 1
- Crashed when it can't find the day...
- obsolete - please ignore
- TypeError: Cannot read property 'nodeName' of null HOT 2
- Export does not work (80 days, DayOneExport)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elizabeth.