Giter VIP home page Giter VIP logo

shbin's People

Contributors

alvarmaciel avatar mgaitan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

alvarmaciel

shbin's Issues

shbin setup

function to ask for repo and token and save it to an environment var

[bug] -d and -f do not play well

Consider this example

$ shbin Untitled.ipynb -d ci_naruto
๐Ÿ”—๐Ÿ“‹ 
https://github.com/Shiphero/pastebin/blob/main/mgaitan/ci_naruto/Untitled.ipynb

That's correct . However, if I try to give it a name, the directory is ignored

$ shbin Untitled.ipynb -d ci_naruto -f analysis.ipynb
๐Ÿ”—๐Ÿ“‹ https://github.com/Shiphero/pastebin/blob/main/mgaitan/analysis.ipynb

execute files using github actions

A file could be automatically executed onlune passing a cli option shbin --exec ...

if this is given, we trigger a worflow running a proper environment (node, python, etc, selected by the extension) passing the uploaded file as argument. Any asset generated by the execution will be automatically uploaded to the pastebin.

the url to the run should be returned to the console.

It should be possible to reexecute files by url

download files

implement as a subcommand

shbin dl https://github.com/Shiphero/pastebin/blob/main/mgaitan/7f6GRGhBtDg.md   
shbin dl main/mgaitan/7f6GRGhBtDg.md   
shbin dl mgaitan/7f6GRGhBtDg.md
shbin dl 7f6GRGhBtDg.md    # assume user

Implement the "usage" tutorial as a (maintainable) screencast

<p align="center">
    <img width="75%" src="https://gist.github.com/veracioux/66336d488e8d87c7b3fb696c5dbd93d1/raw/4b8bc0b043faf166abc92e12fc0bfb5acea55345/tuterm-demo.svg" />
</p>

wrap with a given format

add an option --wrap-as (-w) that wraps the content as a "code block" in a markdown file . For instance -w python will produce a file with ".md" extension and the content

 ```python
 <real content here>
 `` `

I guess this than force the extension for a given snippet, and with #6 we could have several snippets in the same document.

commit messages are not well parsed when we update a file

Following the error, this is the problem, we have to send the sha of the file

/home/alvar/.pyenv/versions/3.11.2/envs/SHBIN/lib/python3.11/site-packages/github/Repository.py(2181)create_file()
   2180             f"{self.url}/contents/{urllib.parse.quote(path)}",
-> 2181             input=put_parameters,
   2182         )

ipdb> put_parameters
{'message': 'my cool demo script', 'content': 'aW1wb3J0IHRoaXM='}
ipdb> n
> /home/alvar/.pyenv/versions/3.11.2/envs/SHBIN/lib/python3.11/site-packages/github/Repository.py(2178)create_file()
   2177 
-> 2178         headers, data = self._requester.requestJsonAndCheck(
   2179             "PUT",

ipdb> 
github.GithubException.GithubException: 422 {"message": "Invalid request.\n\n\"sha\" wasn't supplied.", "documentation_url": "https://docs.github.com/rest/reference/repos#create-or-update-file-contents"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.