npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

translate-mds

v4.0.5

Published

translate [folder/single] md file language to you want

Downloads

544

Readme

translate .md to *.mdexplain install size

like

.md to .「all-language」.md

english


Build Status codecov GitHub license npm GitHub release

life

help me live , live need money 💰


This project is for all-of-markdown-writing-files translation工具

npm install -g translate-mds
// all folder·
translateMds md/

//or single file

translateMds test.md

Demo

demo

Command line options

translate [folder/single] md file language to you want

  Usage
    $ translateMds [folder/file name] [options]

  Example
    $ translateMds md/

    [options]
    -a   API      : default < baidu > {google|baidu|youdao}
    -f   from     : default < auto detect >
    -t   to       : default < zh >
    -N   num      : default < 1 > {async number}
    -R   rewrite  : default < false > {yes/no rewrite translate file}

  🌟[high user options]❤️

    -D   debug
    -C   cache              : default: false  cache in disk
    -G   google.com         : default: false  { cn => com with Google api }
    -F   force              : default: false  { If, translate result is no 100%, force wirte md file }
    -M   match              : default [ ". ", "! "//...] {match this str, merge translate result }
    -S   skips              : default ["... ", "etc. ", "i.e. "] {match this str will, skip merge translate result }
    -T   types              : default ["html", "code"] {pass the md AST type}
    --timewait              : default < 80 > {each fetch api wait time}
    --values [path]         : default: false {write the original of wait for translate file} [single file]
    --translate [path]      : default: false {use this file translate} [single file]
    --text-glob [pattern]   : default: false {text must be match, then be transalte}
    --no-disk               : default: false {do not use cached Result}
    --cache-name [filename] : default: "translateMds" named the cache file
    --glob [pattern]        : default: false {file must be match, then be transalte}
    --ignore [relative file/folder] : default: false {ignore files/folders string, split with `,` }

My-translate-list

Project test translation listorMore Chinese 🇨🇳 translation list

common problem

1. Sometimes the wind will get stuck and stagnate.

If slow , may be you should try again or use -D

The problem comes from the API, you just have to run it again.

2. There are a number of totals that have not been translated successfully

Quantity is no translation success / total is the total number of single file translations

This problem occurs, usually from the shift of characters caused by unusual symbols or sentences that are too long.

At this time, you can use-DDebug /-FForce write to file / Adjust unusual characters

Specific can be seen

Tips

  1. Diff file type, may try pandoc converter
  2. May use cli without -f **,cause translation.js auto detect language
  • --timewait [number] can lengthen the time of each request translation, reduce the banned ip
  • --values [file-path] (single file usage) to get the original output file to be translated
  • --translate [file-path] (single file usage) replaces the request api and uses the translated content of this file instead

Welcome 👏 ISSUE and PULL

characteristic

  • [x] Improve the accuracy of md format such as http

  • [x] Automatic translation

  • [x] Enable md AST

Split Code


UseremarkImprove accuracy

Usetranslation.jsComplete interaction with the translation website

There is anotherAsynchronous Promise recursive example