Thanks for clarification!

Best wishes
Mohammad


On Sat, Sep 7, 2019 at 4:39 PM Richard Campbell <[email protected]> wrote:

> Hi - the repo is a bit of a jumble.  I first tried a Google Cloud Function
> to do the work (free hosting for the function!); that worked fine, but
> couldn't figure out a nice way to get variables and PATs stored. I then
> tried the code as a bookmarklet, which also worked, but was just a hassle -
> the tgbm.js is the tiddly github bookmarklet code. At least a user could
> edit their own code and make their own bookmarklet, but that's a lot of
> work.
>
> So the current design is just to make it an index.html page (in the repo)
> and serve it via github pages, initially draws out the user input fields,
> then downloads your tiddlywiki index.html and overwrites the page. Can't
> figure out a way to change the URL location so your info/PAT is stored
> under <username>.github.com  rather than netrc.github.com but at least it
> is your local storage.
>
> A couple more things to perhaps clean up in index.html (the only file/code
> that runs). But seems to be mostly ok.
>
> Richard
>
>
> On Saturday, September 7, 2019 at 12:05:40 AM UTC-4, Mohammad wrote:
>>
>> Richard,
>>  It seems in tgbm.js the below line should be revised
>> https://api.github.com/repos/${GH_USER}/tiddly/contents/
>>
>> like
>> const GH_USER = "username here";
>> const GH_PAT = "PAT value here";
>> const GH_REPO = "repo-name- here"
>> const contentsUrl = `
>> https://api.github.com/repos/${GH_USER}/${GH_REPO}/contents/`
>> <https://api.github.com/repos/$%7BGH_USER%7D/$%7BGH_REPO%7D/contents/>;
>>
>> More questions
>>
>>
>>    1. Does it require to use the GitHub save of TW or your method works
>>    without it for example does this method works with TW 5.1.17 (it has not
>>    GitHub Saver)?
>>    2. Does this method allows to save to other branches?
>>    3. Does this method solves the error 409?
>>
>> By the way many thanks for sharing this neat technique.
>>
>>
>> Best wishes
>> Mohammad
>>
>>
>> On Sat, Sep 7, 2019 at 4:59 AM Richard Campbell <[email protected]> wrote:
>>
>>> I'm late to this conversation, but have a small github pages site which
>>> can be used to download a (normal) github repo index.html file using their
>>> GET blob api. You can enter your username, repo, and a PAT (currently it
>>> assumes the tiddlywiki file is "index.html".)   The location and PAT are
>>> stored in local storage, nothing stored in github or on any other site.
>>>
>>> https://netrc.github.io/tiddlyGithub/
>>>
>>> Once you've entered the username/repo/PAT, the download just takes a
>>> second or so (on good connection!).  Then of course the GitHub saver works
>>> nicely in the background to save all changes.
>>>
>>> Richard
>>>
>>>
>>>
>>> On Friday, May 3, 2019 at 5:05:20 AM UTC-4, Jeremy Ruston wrote:
>>>>
>>>> Hi Cameron
>>>>
>>>> Can you show a screenshot of the control panel settings prior to
>>>> clicking “save changes”?
>>>>
>>>> It may also be worth precisely listing the steps you took so that I can
>>>> try to duplicate your result.
>>>>
>>>> Best wishes
>>>>
>>>> Jeremy.
>>>>
>>>> On 3 May 2019, at 00:36, [email protected] wrote:
>>>>
>>>> Hi Jeremy,
>>>>   Thanks for reading my comment. I am actually using Chrome, and when I
>>>> follow along with the intended workflow it removes my github auth token and
>>>> also the save feature just downloads index.html in-browser. If you follow
>>>> my link or look at the attached image you can also see that all the styling
>>>> and formatting is messed up, I'm using empty.html downloaded from
>>>> prerelease as the basis and no nonstandard tiddlers are added. I understand
>>>> this is prerelease so I am not depending on it I was just excited to use
>>>> tiddlywiki in a  new way. I'm willing to provide more debugging
>>>> information, but I am a bit of a novice so I don't know where to start.
>>>>
>>>> <Capture.PNG>
>>>>
>>>>
>>>>
>>>> On Thursday, May 2, 2019 at 4:10:30 PM UTC-4, Jeremy Ruston wrote:
>>>>>
>>>>> Hi Cameron
>>>>>
>>>>> Firstly, are you using Firefox? I think it doesn’t support
>>>>> XMLHttpRequests from files loaded from a file:// URI. I used Chrome in 
>>>>> most
>>>>> of my testing.
>>>>>
>>>>> The intended workflow is to load the wiki via the
>>>>> https://username.github.io/index.html URI, and then save changes
>>>>> directly back to GitHub. The challenge is that GitHub pages doesn’t update
>>>>> instantly, it takes a few minutes for a pushed HTML file to be accessible.
>>>>> So, care has to be taken not to reload the wiki from GitHub pages before
>>>>> the changes have been processed. To be cautious, one might want to check
>>>>> the wiki in a separate tab to see when it has refreshed.
>>>>>
>>>>> Best wishes
>>>>>
>>>>> Jeremy.
>>>>>
>>>>> On 2 May 2019, at 20:54, [email protected] wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I've been trying to get this working but I feel that I am missing
>>>>> something. i can get my repository to host to github pages but when I use
>>>>> my local browser to open the tiddlywiki (index.html) I've got in the git
>>>>> repo I then cannot save it. Is the workflow (once it works) to navigate to
>>>>> the file on your hard drive, make edits, save it then git commit, push,
>>>>> etc? Every time I try to make modifications they are either not saved
>>>>> because I used the hosted tiddlywiki at github.io to try to make
>>>>> changes or I get a n XHMLHttpRequest error code: 409 if I try to edit the
>>>>> on-disk index.html in my browser and use the tiddlywiki save function. I
>>>>> note that I do have an earlier version of this index.html file being 
>>>>> served
>>>>> in my github pages. What could I be missing?
>>>>>
>>>>> On Thursday, April 4, 2019 at 7:20:36 AM UTC-4, Mohammad wrote:
>>>>>>
>>>>>> Referring to: https://github.com/Jermolene/TiddlyWiki5/issues/3890
>>>>>>
>>>>>> And the nice https://github.com/38911BytesFree/TiddlyWiki
>>>>>>
>>>>>> To save Tiddlywiki directly to GitHub Pages, is it possible to
>>>>>>
>>>>>>
>>>>>>    1. Have GitHub Saver plugin? or
>>>>>>    2. Update the current classic TW to TW5?
>>>>>>
>>>>>>
>>>>>> --Mohammad
>>>>>>
>>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "TiddlyWiki" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> Visit this group at https://groups.google.com/group/tiddlywiki.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/tiddlywiki/3c34a8f5-fa2e-4685-9ab6-19e977d5078a%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/tiddlywiki/3c34a8f5-fa2e-4685-9ab6-19e977d5078a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>>
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "TiddlyWiki" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at https://groups.google.com/group/tiddlywiki.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/tiddlywiki/90888c6e-0349-4f59-aa56-2c35a63a01d8%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/tiddlywiki/90888c6e-0349-4f59-aa56-2c35a63a01d8%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>> <Capture.PNG>
>>>>
>>>>
>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "TiddlyWiki" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/tiddlywiki/8e780ebf-edea-4985-8156-36a8d31d8e0b%40googlegroups.com
>>> <https://groups.google.com/d/msgid/tiddlywiki/8e780ebf-edea-4985-8156-36a8d31d8e0b%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/0ccaf8c7-54d7-4574-9756-7d6974f8e691%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/0ccaf8c7-54d7-4574-9756-7d6974f8e691%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMB%2BaHEMEZ6iuf-SySJo0E98QQL-TCUr1vLYN%3DJUdiz_LQ%40mail.gmail.com.

Reply via email to