Commit Graph

73 Commits

Author SHA1 Message Date
Hippo ab5ced7c6a Allow newer versions of node in package.json
Till now, they had to be strictly equal to 12.x. Now you can also
use newer versions of node (and hopefully they'll work 😛)
2021-07-25 17:26:42 +05:30
Hippo 42f96c00b9 Allow uploading files locally instead of through WebDAV
This gives us more flexibility: after all how often does one have
a WebDAV server handy (unless you're smart enough to use HelioHost
or some other awesome server)?
2021-07-21 22:24:45 +05:30
Hippo 991899a1df Bump convict to version 6 (so we can use new features later)
We want the `nullable` property: coming up in the next commit 😉
2021-07-21 21:59:56 +05:30
Hippo a41b45c58f Add "dry run" options for push-to-ghost command
These options make Seance go through the motions of processing a
post without actually uploading images and/or pushing them to
Ghost. This makes it easier to test out stuff for new features
(or, more accurately, it reduces the need to clean up afterwards!)
2021-03-30 17:41:13 +05:30
Hippo 1d80daba64 Include "Edit on Ghost" button when post is pushed
Convenient, isn't it? ;)
2021-03-30 16:03:43 +05:30
Hippo 1edee70807 Ignore duplicate titles and subtitles
The long-standing "make title proper" bug has finally been fixed.
Yayy! So now, basically, the title and subtitle gets set properly
even if Medium messed it up by showing some of them twice.
2021-03-29 21:52:12 +05:30
Badri Sunderarajan 22664a7d44 Don't freak out if one of the pics hasn't loaded
Instead of throwing up hands in despair, Seance will now simply
ignore the badly loaded image and carry on.
2021-01-09 18:22:53 +05:30
Badri Sunderarajan a35d6195cf Bugfix: Medium URL question mark wasn't being added properly
It was adding the question-mark only if ? was found at position 0
(i.e. at the beginning) instead of at position -1 (i.e. not present
at all).
2021-01-09 16:53:33 +05:30
Hippo 302a74d679 Add helpful nudges for post-processing
Now provides a reminder to fix the title/subtitle/excerpt, and a
helpful URL of the final post destiation to publish on Buffer!

@manasakashi12 hope you find this useful!
2020-07-30 18:13:56 +05:30
Hippo cfa30a3e73 Keep the connectiov alive when not in use
Otherwise, it times out and causes errors
2020-06-04 19:10:37 +05:30
Hippo 01a9b8cf02 Add scissors 2020-05-14 23:01:02 +05:30
Hippo 3e73b04725 Don't log ws messages (because they may have confidential info) 2020-05-14 22:36:41 +05:30
Hippo 51da40b8b0 Remove extraneous command 2020-05-14 22:35:55 +05:30
Hippo 406e54c018 Add (very rudimentary password check)
This also properly handles other errors if/when they come up
2020-05-14 22:34:27 +05:30
Hippo 4cfea0ac3d Allow Seance upload/download through websockets
It's all working! Yay!!
2020-05-14 22:05:29 +05:30
Hippo f99272cd84 Remove top margin from seance fetch page 2020-05-12 16:17:53 +05:30
Hippo 9a9493a196 Remove trailing slash from routes 2020-05-12 16:17:25 +05:30
Hippo 958b846401 Temporarily fixes "render homepage instead of fetch page" bug
For some reason, loading /fetch runs the fetch page, but then
ends up rendering the / page instead. Can't figure it out, but
this solves it for now so let's go with it till we come up with a
proper solution :P
2020-05-12 16:15:18 +05:30
Hippo 99815e0d65 Delete extraneous test button 2020-05-10 23:11:46 +05:30
Hippo 490cb134cd Disable cache for now, because it messes up loading
Don't know why :(
2020-05-10 23:08:37 +05:30
Hippo ee362e8954 Change host protocol depending on website and localhost
If you're on localhost, your protocol (http vs https) takes
precedence. If not, the other website's takes precedence, because
otherwise you could end up being blocked by security
2020-05-10 23:03:14 +05:30
Hippo 7ad8f7b3f8 Make Seance bookmarklet URLs relative
So it'll send people to the current Seance installation instead
of blindly directing them to localhost
2020-05-10 22:44:47 +05:30
Hippo 54ae9f57a6 Add Procfile and node version for Heroku deploy 2020-05-10 18:50:27 +05:30
Badri Sunderarajan 691e3026d9 Increase z-index of "Loading..." bookmarklet banner
Medium's popup was overpowering it, but now we've got the other
hand
2020-05-08 15:44:38 +05:30
Badri Sunderarajan ba50455abd Server: save incoming JSON to file instead of discarding
This is the first step in actually saving and processing the thing
2020-05-08 15:43:34 +05:30
Badri Sunderarajan 50f8002d45 Make fetchMediumJSON's URL guessing more intelligent
Now, it checks and processes the current query string instead of
blindly tacking on a "?format=json" at the end.
2020-05-08 15:41:07 +05:30
Badri Sunderarajan 6496768956 Fix create-user command and make it actually save a file
Earlier, it used to print out the stuff to the screen, which you'd
then have to copy to a file manually - tedious!

By the way, the other fixes were typos and omissions while changing
Seance from a simple file to an object.
2020-05-08 15:39:44 +05:30
Hippo 8117d24b4c Set up Medium fetching via bookmarklet!
Currently this only loads post details; it doesn't process it
(ie. download images, etc.) yet.
2020-05-07 22:57:34 +05:30
Hippo d2b2bfa2e2 Bugfix: CSS output path was relative instead of absolute 2020-05-07 22:56:18 +05:30
Hippo 8c7ad6e81e Adjust dependencies to stop causing errors
Essentially, downgrade Babel and a few related packages
2020-05-05 21:27:10 +05:30
Hippo 35cdad01c2 Set up Bulma
Also, an empty directory (with a placeholder index.htm) to render
the static files
2020-05-05 19:22:46 +05:30
Hippo 2353195837 Set up skeleton server! 2020-05-05 18:40:41 +05:30
Hippo f31cc73cc8 Give .js files more descriptive names
This is in preparation for setting up the server! ;-)
2020-05-05 18:01:34 +05:30
Badri Sunderarajan 73212d9d20 Make Seance functions event-based
They now emit events when updates happen: the first step to making
the asychronous online server version!
2020-05-04 19:02:55 +05:30
Badri Sunderarajan 4a86adcbe3 Upload files one at a time to avoid race-conditions 2020-05-04 18:21:59 +05:30
Badri Sunderarajan 0d8c6c6adc Make fs read and write operations asynchronous
We're using the Promise/async version of file read/write commands,
so the script doesn't keep blocking or hanging around but can
keep doing other stuff till the file reading or writing is over
2020-05-04 18:18:31 +05:30
Badri Sunderarajan 198f576123 Allow passing local JSON instead of downloading
This way, if you have the JSON already there locally, you don't
have to bother downloading it from online. Especially useful if
the JSON is passed to you some other way, like through a browser
for example
2020-05-04 18:06:01 +05:30
Badri Sunderarajan 0d9ecfd8f5 Make Seance into separate Object
Now, the Seance object is what everyone operates with. That way,
we can do fancy stuff like emitting events, etc. if the need so
arises (as it will, very soon; trust me).
2020-05-04 18:01:05 +05:30
Badri Sunderarajan e0b5ab31b4 Update mediumexporter 2020-05-04 16:45:23 +05:30
Badri Sunderarajan 299369b363 Bugfix: crashes when no config file detected
It was looking for a (nonexistent, obsolete) variable to check if
the "config" command is running. Now, it just looks at the
command-line options directly and does it.
2020-05-04 13:57:09 +05:30
Hippo 51b7dcf49a Add setup command (to set all config variables) 2020-04-26 21:12:15 +05:30
Hippo 751a647a73 Gracefully fail if Ghost admin not set
This is still ungraceful, in the sense it'll fail spectacularly
later, but at least it gives us the opportunity to run the new
`setup` command first.

Where's that command, you say? Just wait for the next commit! ;-)
2020-04-26 21:11:19 +05:30
Hippo a57add4809 Allow YAML config load, and escape route if it doesn't exist
The "escape route" is the setup command (yet to be implemented)
2020-04-26 18:38:53 +05:30
Hippo 53b0832a8c Use convict to load config settings 2020-04-24 22:20:18 +05:30
Hippo fa8b2022ce Add .env to gitignore 2020-04-24 21:29:20 +05:30
Hippo e41358118a Move config loading to a new file
This is so that we can extend it further (by loading from more
locations, etc.)
2020-04-24 21:28:39 +05:30
Badri Sunderarajan e1ec23fc3b
Adjust mediumexporter dependency to use seance-latest edition
This is a branch that will be kept updated to work with seance
even if the original at github:xdamman/mediumexporter#master
takes time to pull in changes
2020-01-11 16:40:15 +05:30
Hippo 629549910d Bugfix: double-negative in directory-creation check 2020-01-03 16:04:25 +05:30
Hippo f402fe6195 Tweak upload functions for more sensible error logging 2020-01-02 14:29:07 +05:30
Hippo b6a8fe4e63 Upload and set featured image while pushing to Ghost
NOTE: mediumexporter also needs to be updated to download the
feature image in the first place!
2020-01-01 21:37:36 +05:30