Code Monkey home page Code Monkey logo

Comments (8)

haoel avatar haoel commented on July 1, 2024

They use the GraphQL API, I will update my script soon.

very soon......

from leetcode.

haoel avatar haoel commented on July 1, 2024

@shwsun please test the new scripts

from leetcode.

jethrosun avatar jethrosun commented on July 1, 2024

Hi, I think there are only two slight problems:

  1. in the query_problem.sh we should use -s instead of -q since that is already deprecated.
  2. the question description is not really inserted into the source_file, I think the ${TMP_FILE} should be ${source_file}.

from leetcode.

haoel avatar haoel commented on July 1, 2024

for 1), you mean the option for xidel command should use -s rather than -q ? (the xidel acutally hasn't -s option)

for 2), the ${TMP_FILE} is a temporary file which will be insert into $source_file late.

#insert the problem description into the source file, and remove it
sed -i.bak '4 r '${TMP_FILE}'' ${source_file}

may I know more details?

from leetcode.

haoel avatar haoel commented on July 1, 2024

@shwsun any feedback?

from leetcode.

jethrosun avatar jethrosun commented on July 1, 2024

@haoel I am pretty sure about the param problem. Is it because of the newer version of xidel?

[~/repos/leetcode/scripts]-[master↓]── - xidel -q
-quiet,-q is outdated. Use --silent,-s

Re the other issue, the comment.sh still can't get the problem description into the file from my side.

[~/repos/leetcode/scripts]-[master↓]── - ./comments.sh https://leetcode.com/problems/largest-number/

-quiet,-q is outdated. Use --silent,-s
-quiet,-q is outdated. Use --silent,-s
-quiet,-q is outdated. Use --silent,-s
-quiet,-q is outdated. Use --silent,-s
-quiet,-q is outdated. Use --silent,-s
./comments.sh: line 85: [: ==: unary operator expected
Create a new file - LargestNumber.cpp.
LargestNumber.cpp updated !
[~/repos/leetcode/scripts]-[master↓]── - cat LargestNumber.cpp 
// Source : https://leetcode.com/problems/largest-number/
// Author : shwsun
// Date   : 2018-02-05

/*************************************************************************************** 
 *
 * 
 ***************************************************************************************/

I am running Ubuntu, could you get a Linux and test it a bit?

from leetcode.

haoel avatar haoel commented on July 1, 2024

Thanks for more information.

Yes, the script I only tested on MacOS. And on linux platform, xidel rename the -q option to -s after version 0.9.4, so I need to check the options.

Now, I fix it in commit 0fdf100

from leetcode.

haoel avatar haoel commented on July 1, 2024

I am going to close this issue, @shwsun you can reopen it if anything's still problem

from leetcode.

Related Issues (20)

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.