从百度空间到CSDN——博客搬家源码

简介:
+关注继续查看

注意:下面的方法在csdn博客改版以后无法使用,因为现在csdn博客不支持metadata api,不知道什么时候可以支持。

1.原文连接

http://hi.baidu.com/cnjsp/blog/item/e175cf1b27bc6af6ae513335.html

2.心得

本方法我测试过,是可以用来的,一则感觉思路挺新颖了,程序员自己写代码解决自己的事情。另一个可以通过这个实例学习一下java,所以我贴出我修改后的java代码。

具体思路可以参见原文。

3.代码

CSDNPost.java

  1. package cn.mingyuan.baidu2csdn.core;  
  2.   
  3. import java.io.FileOutputStream;  
  4. import java.io.IOException;  
  5. import java.net.MalformedURLException;  
  6. import java.net.URL;  
  7. import java.util.Date;  
  8. import java.util.HashMap;  
  9. import java.util.Map;  
  10. import org.apache.xmlrpc.XmlRpcException;  
  11. import org.apache.xmlrpc.client.XmlRpcClient;  
  12. import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;  
  13.   
  14. /** 
  15.  * csdn博文 
  16.  *  
  17.  * @author mingyuanonline@gmail.com 
  18.  *  
  19.  */  
  20. public class CSDNPost {  
  21.     /** 
  22.      * 博文创建日期 
  23.      */  
  24.     private Date dateCreated;  
  25.     /** 
  26.      * 博文内容 
  27.      */  
  28.     private String description;  
  29.     /** 
  30.      * 标题 
  31.      */  
  32.     private String title;  
  33.     /** 
  34.      * 博文分类 
  35.      */  
  36.     private String[] categories;  
  37.   
  38.     public CSDNPost() {  
  39.   
  40.     }  
  41.   
  42.     public CSDNPost(String title, String description, String[] categories,  
  43.             Date dateCreated) {  
  44.         this.dateCreated = dateCreated;  
  45.         this.description = description;  
  46.         this.title = title;  
  47.         this.categories = categories;  
  48.     }  
  49.   
  50.     public Date getDateCreated() {  
  51.         return dateCreated;  
  52.     }  
  53.   
  54.     public void setDateCreated(Date dateCreated) {  
  55.         this.dateCreated = dateCreated;  
  56.     }  
  57.   
  58.     public String getDescription() {  
  59.         return description;  
  60.     }  
  61.   
  62.     public void setDescription(String description) {  
  63.         this.description = description;  
  64.     }  
  65.   
  66.     public String getTitle() {  
  67.         return title;  
  68.     }  
  69.   
  70.     public void setTitle(String title) {  
  71.         this.title = title;  
  72.     }  
  73.   
  74.     public String[] getCategories() {  
  75.         return categories;  
  76.     }  
  77.   
  78.     public void setCategories(String[] categories) {  
  79.         this.categories = categories;  
  80.     }  
  81.   
  82.     /** 
  83.      * xml-rpc配置 
  84.      */  
  85.     private static XmlRpcClientConfigImpl config;  
  86.     /** 
  87.      * xml-rpcClient 
  88.      */  
  89.     private static XmlRpcClient client;  
  90.   
  91.     static {  
  92.         config = new XmlRpcClientConfigImpl();  
  93.         try {  
  94.             // 此处请将telnetor替换为您的用户名  
  95.             config.setServerURL(new URL(  
  96.                     "http://blog.csdn.net/xw13106209/services/metablogapi.aspx"));  
  97.         } catch (MalformedURLException e) {  
  98.             System.out.println("请检查url");  
  99.         }  
  100.         client = new XmlRpcClient();  
  101.         client.setConfig(config);  
  102.     }  
  103.   
  104.     /** 
  105.      * 日志记录 
  106.      *  
  107.      * @param log 
  108.      *            log 
  109.      */  
  110.     private void writelog(String log) {  
  111.         FileOutputStream fos = null;  
  112.         try {  
  113.             fos = new FileOutputStream("post.log"true);  
  114.             fos.write((log + "\r\n").getBytes());  
  115.             fos.flush();  
  116.             fos.close();  
  117.         } catch (IOException e) {  
  118.             System.out.println("写入日志错误:" + log);  
  119.         }  
  120.     }  
  121.   
  122.     /** 
  123.      * 发布 
  124.      */  
  125.     public void publish() {  
  126.         Map<String, Object> struct = new HashMap<String, Object>();  
  127.         struct.put("dateCreated", dateCreated);  
  128.         struct.put("description", description);  
  129.         struct.put("title", title);  
  130.         struct.put("categories", categories);  
  131. //      Object[] params = new Object[] { "your usrname",  
  132. //              "replace it with your username",  
  133. //              "replace it with your password", struct, true };  
  134.           
  135.         Object[] params = new Object[] { "xw13106209",  
  136.         "xw13106209",  
  137.         "password", struct, true };  
  138.           
  139.         String blogid = null;  
  140.         try {  
  141.             blogid = (String) client.execute("metaWeblog.newPost", params);  
  142.         } catch (XmlRpcException e) {  
  143.             writelog("导入出现错误:title=" + title);  
  144.             System.out.println("导入出现错误:title=" + title);  
  145.         }  
  146.         writelog(title + ">> 导入完毕,生成博文id为>>" + blogid);  
  147.         System.out.println(title + ">> 导入完毕,生成博文id为>>" + blogid);  
  148.         struct.clear();  
  149.     }  
  150.   
  151.     public static void main(String[] args) {  
  152.         CSDNPost post = new CSDNPost();  
  153.         post.publish();  
  154.     }  
  155. }  

BaiduHi

  1. package cn.mingyuan.baidu2csdn.core;  
  2.   
  3. import java.util.Date;  
  4.   
  5. /** 
  6.  * 百度博客 
  7.  *  
  8.  * @author mingyuanonline@gmail.com 
  9.  *  
  10.  */  
  11. public class BaiduHi {  
  12.     /** 
  13.      * 标题 
  14.      */  
  15.     private String title;  
  16.     /** 
  17.      * 内容 
  18.      */  
  19.     private String description;  
  20.     /** 
  21.      * 分类 
  22.      */  
  23.     private String categories;  
  24.     /** 
  25.      * 发布日期 
  26.      */  
  27.     private Date dateCreated;  
  28.   
  29.     public String getTitle() {  
  30.         return title;  
  31.     }  
  32.   
  33.     public String getDescription() {  
  34.         return description;  
  35.     }  
  36.   
  37.     public String getCategories() {  
  38.         return categories;  
  39.     }  
  40.   
  41.     public Date getDateCreated() {  
  42.         return dateCreated;  
  43.     }  
  44.   
  45.     public void setTitle(String title) {  
  46.         this.title = title;  
  47.     }  
  48.   
  49.     public void setDescription(String description) {  
  50.         this.description = description;  
  51.     }  
  52.   
  53.     public void setCategories(String categories) {  
  54.         this.categories = categories;  
  55.     }  
  56.   
  57.     public void setDateCreated(Date dateCreated) {  
  58.         this.dateCreated = dateCreated;  
  59.     }  
  60.   
  61.     public BaiduHi(String title, String description, String categories,  
  62.             Date dateCreated) {  
  63.         this.title = title;  
  64.         this.description = description;  
  65.         this.categories = categories;  
  66.         this.dateCreated = dateCreated;  
  67.     }  
  68.   
  69.     public BaiduHi() {  
  70.         // TODO Auto-generated constructor stub  
  71.     }  
  72.   
  73.     /** 
  74.      * @param args 
  75.      */  
  76.     public static void main(String[] args) {  
  77.         // TODO Auto-generated method stub  
  78.     }  
  79. }  

BaiduHiFetcher

  1. package cn.mingyuan.baidu2csdn.core;    
  2.   
  3. import java.io.BufferedReader;  
  4. import java.io.IOException;  
  5. import java.io.InputStream;  
  6. import java.io.InputStreamReader;  
  7. import java.net.MalformedURLException;  
  8. import java.net.URL;  
  9. import java.net.URLConnection;  
  10. import java.util.ArrayList;  
  11. import java.util.Date;  
  12. import java.util.List;  
  13. import java.util.Stack;  
  14. import java.util.regex.Matcher;  
  15. import java.util.regex.Pattern;  
  16.   
  17. /** 
  18.  * 百度博客数据抓取及解析 
  19.  *  
  20.  * @author mingyuanonline@gmail.com 
  21.  *  
  22.  */  
  23. public class BaiduHiFetcher {  
  24.     /** 
  25.      * 下载页面 
  26.      *  
  27.      * @param url 
  28.      *            url 
  29.      * @return 网页源码 
  30.      */  
  31.     private String downloadPage(String url) {  
  32.         URLConnection conn;  
  33.         InputStream in;  
  34.         BufferedReader reader = null;  
  35.         StringBuilder sb = new StringBuilder();  
  36.         String line = null;  
  37.         try {  
  38.             conn = new URL(url).openConnection();  
  39.             in = conn.getInputStream();  
  40.             reader = new BufferedReader(new InputStreamReader(in, "gb2312"));  
  41.             while ((line = reader.readLine()) != null) {  
  42.                 sb.append(line);  
  43.             }  
  44.             in.close();  
  45.             reader.close();  
  46.         } catch (MalformedURLException e) {  
  47.             System.out.println("请检查url是否规范");  
  48.         } catch (IOException e) {  
  49.             System.out.println("读取源码错误:" + url);  
  50.         }  
  51.         return sb.toString();  
  52.     }  
  53.   
  54.     /** 
  55.      * 获取页面博文链接 
  56.      *  
  57.      * @param html 
  58.      *            网页源码 
  59.      * @return 页面中的博文链接 
  60.      */  
  61.     private List<String> getPostLinks(String html) {  
  62.         // 分析页面内容,取得页面中的文章链接  
  63.         String titleDivRegex = "<div[\\s]class=\"tit\"><a[\\s]href=[^<>]+?target=\"_blank\">.+?</div>";  
  64.         Pattern titleDivPattern = Pattern.compile(titleDivRegex);  
  65.         Matcher titleDivMatcher = titleDivPattern.matcher(html);  
  66.         List<String> posts = new ArrayList<String>();  
  67.         while (titleDivMatcher.find()) {  
  68.             String div = titleDivMatcher.group();  
  69.             String titleUrl = div.substring(div.indexOf("/"), div  
  70.                     .indexOf("\" target"));  
  71.             posts.add("http://hi.baidu.com" + titleUrl);  
  72.         }  
  73.         return posts;  
  74.     }  
  75.   
  76.     /** 
  77.      * <p> 
  78.      * 获取博客总页数 <br> 
  79.      * 我的博客内容有16页,有上一页,下一页,尾页等这样的标志,如果博文少的话可能这些标志不会出现,请修改此方法 
  80.      *  
  81.      * @param html 
  82.      *            源码(最好是第一页) 
  83.      * @return 博客总页数 
  84.      */  
  85.     private int getTotalPages(String html) {  
  86.         // 页码  
  87.         // <a href="/cnjsp/blog/index/16"  
  88.         // mce_href="cnjsp/blog/index/16">[尾页]</a>  
  89.         String pageRegex = "<a[\\s]href=\"/cnjsp/blog/index/[\\d][\\d]\">\\[尾页\\]</a>";  
  90.         Pattern pagePattern = Pattern.compile(pageRegex);  
  91.         Matcher pageMatcher = pagePattern.matcher(html);  
  92.         String totalPagesStr = null;  
  93.         int pages = 0;  
  94.         if (pageMatcher.find()) {  
  95.             String pagelink = pageMatcher.group();  
  96.             totalPagesStr = pagelink.replaceAll(  
  97.                     "<a[\\s]href=\"/cnjsp/blog/index/""").replaceAll(  
  98.                     "\">\\[尾页\\]</a>""");  
  99.             pages = Integer.parseInt(totalPagesStr);  
  100.         }  
  101.         return pages;  
  102.     }  
  103.   
  104.     /** 
  105.      * <p> 
  106.      * 获取博客的所有博文的地址 <br> 
  107.      * 没有对url进行编码处理,如果博客地址含中文,请对url进行处理 
  108.      *  
  109.      * @param blogUrl 
  110.      *            博客地址 
  111.      * @return 所有博文地址,存放于栈中,使用的时候请使用pop方法取出元素,这样可以保证按照最先发表的博文最先处理 
  112.      */  
  113.     public Stack<String> getAllPostLink(String blogUrl) {  
  114.         Stack<String> posts = new Stack<String>();  
  115.         // 1.下载第一页  
  116.         String firstPageHtml = downloadPage(blogUrl + "/blog/index/0");  
  117.         // 2.获取博文总页数  
  118. //      int totalPages = getTotalPages(firstPageHtml);  
  119.         int totalPages = 2;  
  120.         // 3.下载各摘要页  
  121.         posts.addAll(getPostLinks(firstPageHtml));  
  122.         if (totalPages < 1) {  
  123.             return posts;  
  124.         }  
  125.         for (int i = 1; i <= totalPages; i++) {  
  126.             String page = downloadPage(blogUrl + "/blog/index/" + i);  
  127.             posts.addAll(getPostLinks(page));  
  128.         }  
  129.         return posts;  
  130.     }  
  131.   
  132.     /** 
  133.      * 解析博文,获取标题,发布时间,内容,分类等信息 
  134.      *  
  135.      * @param postUrl 
  136.      *            博文地址 
  137.      * @return 封装了博文信息的BaiduHi 
  138.      */  
  139.     public BaiduHi getBaiduHi(String postUrl) {  
  140.         String html = downloadPage(postUrl);  
  141.         // /<div class="tit">  
  142.         String titleDivRegex = "<div[\\s]id=\"m_blog\"[\\s]class=\"modbox\"[\\s]style=\"overflow-x:hidden;\"><div[\\s]class=\"tit\">.+?</div><div[\\s]class=\"date\">";  
  143.         Pattern titleDivPattern = Pattern.compile(titleDivRegex);  
  144.         Matcher titleDivMatcher = titleDivPattern.matcher(html);  
  145.         String title = null;  
  146.         if (titleDivMatcher.find()) {  
  147.             title = titleDivMatcher  
  148.                     .group()  
  149.                     .replaceAll(  
  150.                             "<div[\\s]id=\"m_blog\"[\\s]class=\"modbox\"[\\s]style=\"overflow-x:hidden;\"><div[\\s]class=\"tit\">",  
  151.                             "")  
  152.                     .replaceAll("</div><div[\\s]class=\"date\">""").trim();  
  153.         }  
  154.         String dateDivRegex = "<div[\\s]class=\"date\">.+?</div>";  
  155.         Pattern dateDivPattern = Pattern.compile(dateDivRegex);  
  156.         Matcher dateMatcher = dateDivPattern.matcher(html);  
  157.         String dateStr = null;  
  158.         Date postDate = null;  
  159.         if (dateMatcher.find()) {  
  160.             dateStr = dateMatcher.group().replaceAll(  
  161.                     "<div[\\s]class=\"date\">""").replaceAll("</div>""")  
  162.                     .trim();  
  163.             postDate = getDate(dateStr);  
  164.         }  
  165.         String textDivRegex = "<div[\\s]id=\"blog_text\"[\\s]class=\"cnt\"[\\s]+>.+?</div>";  
  166.         Pattern textDivPattern = Pattern.compile(textDivRegex);  
  167.         Matcher textMatcher = textDivPattern.matcher(html);  
  168.         String text = null;  
  169.         if (textMatcher.find()) {  
  170.             text = textMatcher.group().replaceAll(  
  171.                     "<div[\\s]id=\"blog_text\"[\\s]class=\"cnt\"[\\s]+>""")  
  172.                     .replaceAll("</div>""").trim();  
  173.         }  
  174.         String categoriesRegex = "title=\"查看该分类中所有文章\">类别:.+?</a>";  
  175.         Pattern categoriesDivPattern = Pattern.compile(categoriesRegex);  
  176.         Matcher categoriesMatcher = categoriesDivPattern.matcher(html);  
  177.         String categories = null;  
  178.         if (categoriesMatcher.find()) {  
  179.             categories = categoriesMatcher.group().replaceAll(  
  180.                     "title=\"查看该分类中所有文章\">类别:""").replaceAll("</a>""")  
  181.                     .trim();  
  182.         }  
  183.         BaiduHi hi = new BaiduHi();  
  184.         hi.setTitle(title);  
  185.         hi.setDescription(text);  
  186.         hi.setCategories(categories);  
  187.         hi.setDateCreated(postDate);  
  188.         return hi;  
  189.     }  
  190.   
  191.     /** 
  192.      * 解析博文中的日期格式返回Date类型 
  193.      * 日期格式为:2011年07月01日 星期五 下午 01:05 
  194.      * @param str 
  195.      *            博文中的日期 
  196.      * @return Date类型日期 
  197.      */  
  198.     @SuppressWarnings("deprecation")  
  199.     private Date getDate(String str) {  
  200.         String yearStr = str.substring(0, str.indexOf("年")).trim();  
  201.         String monthStr = str.substring(str.indexOf("年"), str.indexOf("月"))  
  202.                 .replace("年""").trim();  
  203.         String dayStr = str.substring(str.indexOf("月"), str.indexOf("日"))  
  204.                 .replace("月""").trim();  
  205.         String timeStr = str.substring(str.indexOf("午")).replace("午""")  
  206.                 .trim();  
  207.         String hourStr = timeStr.split(":")[0];  
  208.         String minutesStr = timeStr.split(":")[1];  
  209.         Date date = new Date();  
  210.         date.setYear(Integer.parseInt(yearStr) - 1900);  
  211.         date.setMonth(Integer.parseInt(monthStr) - 1);  
  212.         date.setDate(Integer.parseInt(dayStr));  
  213.         if (str.contains("下午")) {  
  214.             date.setHours(Integer.parseInt(hourStr) + 12);  
  215.         } else {  
  216.             date.setHours(Integer.parseInt(hourStr));  
  217.         }  
  218.         date.setMinutes(Integer.parseInt(minutesStr));  
  219.         return date;  
  220.     }  
  221. }  

Transfer 

  1. package cn.mingyuan.baidu2csdn.core;  
  2.   
  3. import java.util.Stack;  
  4.   
  5. /** 
  6.  * 搬家 
  7.  *  
  8.  * @author mingyuanonline@gmail.com 
  9.  *  
  10.  */  
  11. public class Transfer {  
  12.     /** 
  13.      * @param args 
  14.      */  
  15.     public static void main(String[] args) {  
  16.         // TODO Auto-generated method stub  
  17.         //String postUrl = "http://hi.baidu.com/cnjsp";  
  18.         String postUrl = "http://hi.baidu.com/xwdreamer";  
  19.         BaiduHiFetcher fetcher = new BaiduHiFetcher();  
  20.         Stack<String> urls = null;  
  21.         urls = fetcher.getAllPostLink(postUrl);  
  22.         while (!urls.isEmpty()) {  
  23.             String url = urls.pop();  
  24.             BaiduHi hi = null;  
  25.             hi = fetcher.getBaiduHi(url);  
  26.             CSDNPost post = new CSDNPost();  
  27.             post.setTitle(hi.getTitle());  
  28.             post.setDescription(hi.getDescription());  
  29.             post.setCategories(new String[] { hi.getCategories() });  
  30.             post.setDateCreated(hi.getDateCreated());  
  31.             post.publish();  
  32.             try {  
  33.                 Thread.sleep(5 * 1000);  
  34.             } catch (InterruptedException e) {  
  35.                 System.out.println("休眠出错");  
  36.             }  
  37.         }  
  38.     }  
  39. }  

DeletePostById

  1. package cn.mingyuan.baidu2csdn.core;  
  2.   
  3. import java.io.BufferedReader;  
  4. import java.io.FileInputStream;  
  5. import java.io.FileNotFoundException;  
  6. import java.io.IOException;  
  7. import java.io.InputStreamReader;  
  8. import java.net.MalformedURLException;  
  9. import java.net.URL;  
  10. import org.apache.xmlrpc.XmlRpcException;  
  11. import org.apache.xmlrpc.client.XmlRpcClient;  
  12. import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;  
  13.   
  14. public class DeletePostById {  
  15.     private static XmlRpcClientConfigImpl config;  
  16.     private static XmlRpcClient client;  
  17.     static {  
  18.         config = new XmlRpcClientConfigImpl();  
  19.         try {  
  20.             config.setServerURL(new URL(  
  21.                     "http://blog.csdn.net/telnetor/services/metablogapi.aspx"));  
  22.         } catch (MalformedURLException e) {  
  23.             System.out.println("请检查url");  
  24.         }  
  25.         client = new XmlRpcClient();  
  26.         client.setConfig(config);  
  27.     }  
  28.   
  29.     /** 
  30.      * 删除帖子 
  31.      *  
  32.      * @param appkey 
  33.      *            appkey,可以任意,这是一个忽略的值 
  34.      * @param postid 
  35.      *            帖子id 
  36.      * @param username 
  37.      *            用户名 
  38.      * @param password 
  39.      *            密码 
  40.      * @param publish 
  41.      *            博客在帖子被删除之后是否重新发布 
  42.      */  
  43.     public static void delete(String appkey, String postid, String username,  
  44.             String password, boolean publish) {  
  45.   
  46.         Object[] params = new Object[] { "ignored value", postid, username,  
  47.                 password, true };  
  48.         try {  
  49.             client.execute("blogger.deletePost", params);  
  50.         } catch (XmlRpcException e) {  
  51.             System.out.println("删除出错,postid=" + postid);  
  52.         }  
  53.         System.out.println(postid + "删除完毕");  
  54.   
  55.     }  
  56.   
  57.     /** 
  58.      * @param args 
  59.      * @throws InterruptedException 
  60.      */  
  61.     public static void main(String[] args) throws InterruptedException {  
  62.         BufferedReader reader = null;  
  63.         String line;  
  64.         try {  
  65.             reader = new BufferedReader(new InputStreamReader(  
  66.                     new FileInputStream("content")));  
  67.             while ((line = reader.readLine()) != null) {  
  68.                 line = line.split("生成博文id为:")[1];  
  69.                 delete("ignored", line, "your username""your password"true);  
  70.                 Thread.sleep(1000 * 10);  
  71.             }  
  72.         } catch (FileNotFoundException e1) {  
  73.             System.out.println("文件没找到");  
  74.         } catch (IOException e) {  
  75.             System.out.println("读取文件失败");  
  76.         }  
  77.   
  78.     }  
  79. }  


本文转自xwdreamer博客园博客,原文链接:http://www.cnblogs.com/xwdreamer/archive/2011/07/19/2296977.html,如需转载请自行联系原作者

目录
相关文章
|
10月前
|
人工智能 自然语言处理 自动驾驶
破壁人AI百度:科技公司反内卷的典型样本
互联网整个行业都在陷入被动且尴尬的局面。去年开始流行的“内卷”一词,恰如其分的描述了互联网的现状,比如抖音开始做外卖,微信强推视频号,一直硝烟弥漫的电商市场,更是激战在社区团购上
119 0
破壁人AI百度:科技公司反内卷的典型样本
|
11月前
|
人工智能
百度飞桨学院神奇AI技术
百度飞桨学院神奇AI技术
78 0
百度飞桨学院神奇AI技术
|
11月前
|
人工智能 自然语言处理 自动驾驶
破壁人AI百度:科技公司反内卷的典型样本
互联网整个行业都在陷入被动且尴尬的局面。去年开始流行的“内卷”一词,恰如其分的描述了互联网的现状,比如抖音开始做外卖,微信强推视频号,一直硝烟弥漫的电商市场,更是激战在社区团购上。
107 0
破壁人AI百度:科技公司反内卷的典型样本
|
存储 缓存 Java
Android 百度语音合成 (含离线、在线、API合成方式,详细步骤+源码)
Android 百度语音合成 (含离线、在线、API合成方式,详细步骤+源码)
424 0
Android 百度语音合成 (含离线、在线、API合成方式,详细步骤+源码)
|
JSON 文字识别 API
Android 百度文字识别(详细步骤+源码)
Android 百度文字识别(详细步骤+源码)
318 0
Android 百度文字识别(详细步骤+源码)
|
JSON 程序员 API
Android 百度语音识别(详细步骤+源码)
Android 百度语音识别(详细步骤+源码)
315 1
Android 百度语音识别(详细步骤+源码)
|
存储 缓存 算法
百度 UidGenerator 源码解析
Twitter 实现中使用前 5 位作为数据中心标识,后 5 位作为机器标识,可以部署 1024 (2^10)个节点。意思就是最多代表 2 ^ 5 个机房(32 个机房),每个机房里可以代表 2 ^ 5 个机器(32 台机器)。具体的分区可以根据自己的需要定义。比如拿出 4 位标识业务号,其他 6 位作为机器号。
百度 UidGenerator 源码解析
|
测试技术 芯片
百度智能手环方案开源(含源码,原理图,APP,通信协议等)
分享一个百度智能手环开源项目的设计方案资料。 项目简介 百度云智能手环的开源方案是基于Apache2.0开源协议,开源内容包括硬件设计文档,原理图、ROM、通讯协议在内的全套方案,同时开放APP和云服务的免费使用。
3552 0
|
数据格式 JavaScript JSON
使用百度UMeditor富文本编辑器,修改自定义图片上传,修改源码
富文本编辑器,不多说了,这个大家应该都用到过,至于用到的什么版本,那就分很多种 CKEditor:很早以前叫FCK,那个时候也用过,现在改名了,比较流行的一个插件,国外很多公司在用 UEDITOR:百度开发的插件,lite版是UM EasyUI编辑器:用easyUI的都懂,基本上肯定用到 其他的富文...
1443 0
为什么百度首页的HTML源码最后一行要多一行?浪费空间呀!
 为什么百度首页的HTML源码最后一行要多一行?浪费空间呀!
862 0
相关产品
云迁移中心
相关课程
更多
推荐文章
更多