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

question - Is it possible to import disqus comments into giscus? #330

Open
gaocegege opened this issue Dec 31, 2021 · 5 comments
Open

question - Is it possible to import disqus comments into giscus? #330

gaocegege opened this issue Dec 31, 2021 · 5 comments
Labels
question Further information is requested

Comments

@gaocegege
Copy link

Hi thanks for the awesome comment system!

I am wondering if it is possible to import disqus comments into giscus?

@DerGoogler
Copy link

No it won't.

@laymonage laymonage added the question Further information is requested label Jan 9, 2022
@laymonage
Copy link
Member

Reiterating my point from #196:

Importing is possible, with a few caveats because the imported discussions and comments will be made as new ones. Some caveats I can think of right now:

  1. Timestamps on the comment itself will be replaced by the timestamp of your import.
  2. The comment author would be replaced by your (or your bot's) GitHub username. There's no way to create a new comment on behalf of the actual author unless they have a GitHub account and they explicitly give you the permission.

Original information for (1) and (2) can still be shown by including it in the comment body, e.g.

On Oct 17, 2021, @samarulmeu wrote:
Actual comment body here

But of course, someone needs to write the import script for that to work. I don't have the time to work on it yet.

@knpwrs
Copy link

knpwrs commented Feb 23, 2022

There is prior art from utterances which may be interesting: utterance/utterances#7 (comment)

@bric3
Copy link

bric3 commented Oct 17, 2022

Hi for information, I was also hitting this issue, and I decided to write a tool that can migrate a Disqus export as GitHub Discussions, it's far from perfect, and clearly I probably didn't fully tested edge cases.

https://gist.github.com/bric3/af915687717d9aa06b0f9b06d600c127

Basically the steps are (You need a Java 19 install and jbang)

  1. Go to the Diqus export page

  2. Optional Extract the authors, to manually configure a mapping to Github Users

    $ jbang https://gist.github.com/bric3/af915687717d9aa06b0f9b06d600c127 \
      -f forum-name-on-discus \
      -e disqus-export.xml \
      -a

    Removing lines without match

    - Brice Dutheil
    + Brice Dutheil,@bric3
    - Anonymous
    - Carlos
    + Carlos, @carlos
    - Bob

    Note: when testing you may want to remove @ to avoid spamming actual users.

  3. Make the conversion (I strongly suggest to try that on a temporary repository)

    $ env GITHUB_TOKEN=$(op item get "Github" --fields "gh-cli") \
      jbang https://gist.github.com/bric3/af915687717d9aa06b0f9b06d600c127 \
      -f the-forum-name \
      -e disqus-export.xml \
      -r bric3/bric3.github.io \
      -c "My Category" \
      -m pathname \
      --host https://blog.arkey.fr \
      -u author-mapping.csv \
      -o "@bric3" \
      -s

    Note : there's also a dry-run mode (--dry-run or -n) that will instead show what discussions and comment will be sent to GitHub.

Here's a simple blog post explaining a tad more my experience during the migration from Discus to Giscus.

@LITUATUI
Copy link

LITUATUI commented Apr 8, 2024

Hi guys.

Is there an update to the best way of importing Disqus comments to Giscus?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants