hackmdio / hackmdio/codimd

Feature request: Import/export file in GitHub repository

Offen
#218 4 Kommentare 11 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
feature import/export
Vorherrschende Sprache
JavaScript
Sterne
10.1k
Forks
1.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi, I'm a fan of hackmd. I was wondering what you think of the idea of import/export to a file in a GitHub repository. I store all my markdown files on GitHub and would love a seamless way to edit them in HackMD but make sure they are saved back into the repository afterwards.

A user story would be something like:
- When a user clicks the Menu button, they should see a GitHub under both Import and Export.
- When clicking on Import, they should get a file selector that lets them choose the repository and file they want to import into the current editor
- If importing a file into an existing document, it would warn them before overwriting anything
- If they have never authenticated a github account before they should be asked to do the OAuth login with GitHub in a popup window the first time they import or export
- When clicking on export, they should see the same file selector as Import. Note they can also Export without having Importing from GitHub. They should be able to choose a commit message and branch
- They should be notified when their export has saved to GitHub successfully. If there are conflicts in the GitHub repository they should be ignored and the file they chose to export to should be overwritten with the contents of the hackmd
- If they export again later, their choice of file from the first export should be cached in the file selector so they don't have to search for the file again

Another idea might be a markdown button like 'Edit on HackMD' that you could put in markdown files on GItHub. When you click the button it would take you to a HackMD that contains the markdown files contents. In this case maybe the HackMD could be 'linked' to that file so you could avoid the need for the 'file selector' UI described above, as the file would be set at the time you create the HackMD and wouldn't need to be changed.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die Einstiegspunkte für Import und Export im Menu zu erfassen, und prüfe anschließend den GitHub OAuth-Flow sowie die in der Anfrage beschriebene Auswahl von Repository-Dateien. Die Arbeit ist abgeschlossen, wenn Benutzer sich authentifizieren, eine Repository-Datei auswählen, sie sicher importieren und mit einem Branch und einer Commit-Nachricht exportieren können, einschließlich Erfolgsbenachrichtigung, Überschreibverhalten und zwischengespeicherter Dateiauswahl.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github, javascript, markdown
Bereich
api, authentication, full-stack
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
22/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.