Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref T586 support any writefreely instance #36

Open
wants to merge 24 commits into
base: develop
from

Conversation

Projects
None yet
1 participant
@robjloranger
Copy link
Member

commented Jun 11, 2019

This one is a bit huge.

First this creates a new binary wf which supports additional features not needed on write.as. Namely different hosts and multiple users, as many user accounts can be authenticated as you wish. Just pass a -u <username> global flag to select the one to use for an action. i.e. wf -u rob posts

This would be v1.0 for wf.

@robjloranger

This comment has been minimized.

Copy link
Member Author

commented Jun 11, 2019

also will need to verify the change with global flags doesn't break anything
fixed

@robjloranger robjloranger marked this pull request as ready for review Jun 11, 2019

@robjloranger

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2019

found a small bug I missed, unsynced posts are stored in one file at the root, not at each host level. fix incoming.

@robjloranger robjloranger changed the title ref T586 support any writefreely instance [WIP] ref T586 support any writefreely instance Jun 12, 2019

@robjloranger

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2019

just waiting for writeas/go-writeas#18 to verify things work as expected

@robjloranger robjloranger changed the title [WIP] ref T586 support any writefreely instance ref T586 support any writefreely instance Jun 13, 2019

@robjloranger robjloranger requested a review from thebaer Jun 13, 2019

robjloranger added some commits Jun 7, 2019

add new wf binary for community instances
this creates a second binary, wf, which will have additonal
functionality for hosts other than write.as.

also moves global flags into their own slice in new file

adds `host, H` global flag

inlcudes gitignore for binary
store/load user with host specific sub folder
only if host flag supplied for writefreely binary, writeas unaffected
fix bug with creating empty dir in working dir
some changes resulted in the data directory initialization creating the
.writeas/.writefreely directory in the current working directory.
start multi user authentication
- adds new user/u flag to wf
- load and save user file based on username
- removed host flag from writeas
- adds hidden global flag for user to writeas to maintain
compatibility
multiple user authentication
- now allows authentication with more than one user per host, stored as
username.json inside the [host] directory.
- supports a default user and host in config.ini
- global flags will override the default
support any writefreely instance
full support, auth and actions working by use of flags or defaults
maintains backwards compatibility with write.as
wf: remove fetch and add blogs cmd
this get's the wf binary up to date with the writeas functionality
store user.json in user sub folder
only on wf, writeas still stores in root user config directory
bugfix: default user should work on other domains
there was a bug where a default user at the config directory root was
not being used for calls not including a flag or host level config.ini
include new claim cmd in wf
also update CmdClaim for new LoadUser signiture
revert global flag change
I had changed the global flags variable to only be those that are global
this broke some compatibility with piping from stdout into the binary.

also:
- binary specific configuration details have moved into the same map but
in main.go. only the configDir is OS dependent.
- a new key in the map is for the version so each binary can have their
own
local posts should use host dir
also CmdPost should return an exit error if there is one
use v2.0.1 go-writeas
for inclusion of collection in post parameters
default to user collection
new posts, when no flag is specified for blog or collection, will now
default to the user collection. that is the username.

@robjloranger robjloranger changed the base branch from version-two to develop Jun 18, 2019

@robjloranger

This comment has been minimized.

Copy link
Member Author

commented Jun 25, 2019

updated, but I need to make a change for custom tor url now

robjloranger added some commits Jun 25, 2019

add config.TorURL
select tor URL based on provided host flag, default host in config or
default write.as onion address. in that order of precedence.
update wf binary flags to include tor
all network calls should respect tor when set
update note about user and host flags
previously was calling the new `wf` binary the community edition, now
just called `writefreely`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.