I have a very simple notebook, hosted on github and on bitbucket.
The github URL
displays fine in the nbviewer, but the bitbucket URL
- which should indicate the same trivial notebook - does not work with the nbviewer.
Is it possible that nbviewer only takes github notebooks?
Later comment:
my repo was private - so that was at least one reason why it could not work!
Since this is/was the first result when googling for this, I just thought I'd update and let everyone know that this is now an add-on available in Bitbucket. You can find it under Settings -> Find Integrations. The source and issue tracker are available here - https://bitbucket.org/bitbucket/bitbucket-nbviewer
Based on this issue on Bitbucket's issue tracker, it does not seem to be supported yet.
As pointed out by #ThomasK in the comments, you can display a notebook from bitbucket if you copy the raw address.
Just click on the three dots next to your notebook and copy the address that you get when you click on Open raw.
Copy this address...
... and paste it in the text box in https://nbviewer.jupyter.org/ ...
... and it will render your notebook:
Related
It used to be the case that one could easily edit colab notebooks from within GitHub, and also move them (so long as one remembered to change the path in the notebook itself).
Just now I noticed that this functionality in the GitHub browser seems to have been removed. Is this a bug? Is there workaround that does not involve the command line and git?
Is there any way that I can locally link from one Jupyter notebook to another on GitHub without the need to embed the absolute path, such as https://github.com/jeffheaton/test-linking/blob/main/notebook1.ipynb?
I create a notebook (notebook1.ipynb)
With this content:
# This is Notebook 1
* [Link to Notebook 2a](notebook2.ipynb)
* [Link to Notebook 2b](./notebook2.ipynb))
I tried two different methods, one using the . for current directory. Neither worked.
notebook2.ipynb is actually at this URL:
https://github.com/jeffheaton/test-linking/blob/main/notebook2.ipynb
However, GitHub transforms my link into:
https://notebooks.githubusercontent.com/view/notebook2.ipynb
Which results in a bad link.
If I put this same markdown into README.md it works fine. Just does not seem to like jupyter notebooks.
I would really like to NOT have to prefix everything with https://github.com/jeffheaton/test-linking/blob/main/, because the local links:
Work locally, outside of GitHub
On GitHub are branch agnostic
You can see my attempts to make this work at this short repo: https://github.com/jeffheaton/test-linking
In case anyone happens upon this question. GitHub resolved this issue, relative links now appear to work just fine.
I am trying to connect VS code (on win10 machine) to github.
The GitHub Pull Requests and Issues is installed and enabled.
I followed few YouTube guides in which it was mentioned the git button that should appear on the upper right side of the explorer window, in order to add the project to the source control section.
This button doesn't appear at all.
Any idea?
Thank you
Since I post this message, VScode released a new version which makes the connection to Github very simple. For newbies like me that need to establish the connection, you may use the process I use:
1- Create a repository on github, and copy the link to the repo
2- In VScode, in view, command palette: GitClone, then add the link you just copied, select the folder where you want to store the repo on your local drive, and that's it.
3- Use the Source Control button on right, and them stage your changes, commit - and now only push/pull or sync.
Good luck.
New to Jekyll. Have created and hosted a site via github for jekyll. Tried to clone the repo and serve it locally. Problem is that some pages show differently from the online hosted version. If you look at the site I created online:
http://taijisoce.com/
and click (excuse the immaturity) "Jamie is the butthole now its online" you can see it takes you to another well formatted page.
However when I tried to clone it to my local repository (I am on windows) and serve the site the homepage looks alright. But when I click the above link it just takes me to a plaintext line that says "does this work? Can I put this text and make it make sense?" no formatting no css etc.
Repo: https://github.com/themallardcomplexion/themallardcomplexion.github.io
Any ideas?
Looking into this I added YML front matter to my post and tried to serve again. With the front matter entered it formatted correctly.
I just dont understand how Github didnt require front matter for it to format correctly.
I want to use editor in browser and save in github without server. Just like text editor in github/bitbucket could new file and save it
I want to know are there any REST api of this 2 services to easily commit file like that
Or a git library in js that could work without the need to pull all files in to our machine
edit:
After 2018 both service already expose their API. This question is outdated
In case you're looking for an online code editor that you can connect to github or bitbucket then you could take a look at these:
Codeanywhere
Cloud9
If you're looking to develop such an editor yourself, you could just start from github or bitbucket's REST API documentation:
Github
Bitbucket
And just choose the javascript REST library of your preference to interact with those APIs.
For Github: to create/update/remove files you can use the Contents resources.
For example, this section explains how to update a file.
Bitbucket user here, you can EDIT/COMMIT your files in browser.
https://gyazo.com/ff3cb58bcc1cceda0306037989f32ab1
Bitbucket has an online editor where you can change the file and commit right away. Check it out here.
See the official response here:
tldr:
They're working on expanding their API and have responded to an issue opened in 2013
EDIT: An endpoint to do this is now available!
Update August 2021: just type . (dot)
🤫 New shortcut: Press . on any GitHub repo.
That will launch GitHub Codespace on your current repository.
You can install on your local computer benweet/stackedit, a markdown javascript editor.
As mentioned in the README,
Publish your Markdown document on GitHub
(See more at Publication)
You can use Power Editor for Bitbucket for editing and commiting code from browser in bitbucket.